"use client"
import Link from "next/link"
import { usePathname } from "next/navigation"
import { useEffect, useState } from "react"

const Pages = () => {
  const [mounted, setMounted] = useState(false)
  const pathname = usePathname()

  useEffect(() => {
    setMounted(true)
  }, [])

  return (
    <div>
      <h1>Pages</h1>
      {mounted && <Link className="text-[#ccc]" href={`${pathname}/Email`}>邮件</Link>}
    </div>
  )
}

export default Pages